<?php

/**
 *   OPENSHOP 生成显示商品的js代码
 * 
 *   @link        http://baison.com.cn
 *   @copyright   Baison, Inc.
 *   @package     OpenShop
 *   @version     $Id: gen_goods_script.php,v 1.0 2009/06/16 07:35:58 modified $
 *   @author      FillBag <fillbag@hotmail.com>
 */

define('IN_OS', true);

require(dirname(__FILE__) . '/includes/init.php');

/*------------------------------------------------------ */
//-- 生成代码
/*------------------------------------------------------ */

if ($_REQUEST['act'] == 'setup')
{
    /* 检查权限 */
    admin_priv();

    /* 编码 */
    $lang_list = array(
        'UTF8'   => '国际化编码（utf8）',
        'GB2312' => '简体中文',
        'BIG5'   => '繁体中文',
    );
	$intro_list = array(
		'is_best' => '精品',
		'is_new'  => '新品',
		'is_hot'  => '热销',
		'is_promote' => '特价',
		'is_random' => '随机'
	);
    /* 参数赋值 */
    $smarty->assign('ur_here',    '生成商品代码');
    $smarty->assign('cat_list',   cat_list());
    $smarty->assign('brand_list', get_brand_list());
    $smarty->assign('intro_list', $intro_list);
    $smarty->assign('url',        $os->url());
    $smarty->assign('lang_list',  $lang_list);

    /* 显示模板 */
    assign_query_info(); 
	
	$smarty->display('gen_goods_script.tpl');
}
?>